package application

import (
	"github.com/energye/energy/v2/cef"
	"github.com/energye/energy/v2/common"
)

var (
	application *cef.TCEFApplication
)

func GetApplication() *cef.TCEFApplication {
	if application == nil {
		application = cef.NewApplication()
		if common.IsDarwin() {
			application.SetUseMockKeyChain(true)
		}
		//application.SetEnableGPU(true)
		assetsLoad(application)
	}
	return application
}
